package com.weimob.mcloud.wechatwork.customer.service.user.enums;

import lombok.Getter;

/**
 * EC活动类型枚举
 * @author benben.li01
 * @date 2021/2/24
 * @since v5.2
 */
public enum ECActivityTypeEnum {
    /**
     * EC活动类型枚举
     */
    BIGWHEEL("bigwheel", "大转盘"),
    SCRATCH("scratch", "刮刮卡"),
    EGG("egg", "砸金蛋"),
    BOX("box", "拆礼盒"),
    RWK("mktaskcard", "任务卡"),
    DTCJ("dtcj", "答题吃鸡")
    ;

    @Getter
    private String type;

    @Getter
    private String name;

    ECActivityTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getEnumNameByType(String type){
        if (type == null){
            return null;
        }
        for (ECActivityTypeEnum enumItem : values()){
            if (enumItem.type.equals(type)){
                return enumItem.name;
            }
        }
        return null;
    }
}
